from core.basehandler import BaseHandler
from core.room import Room
from core.action import Action


class SwimmerArrives(Room):
    def __init__(self, room_id):
        Room.__init__(self, room_id)    # do basic initialization for every room
        #add inventory items

        # build list of actions
        self.add_action(Next)    
        
    # return description of room.
    def get_description(self):
        return "You made the right call, you're too weak to swim so let the professionals come to you!  The rescue swimmer arrives at your raft and stuffs you into the rescue basket.  As you clear the tops of the waves you feel hope for the first time in days!"
    # return image of room
    def get_image(self):
        return 'swimmerarrives_pic.jpg'
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return SwimmerArrives

class SwimmerArrivesHandler(BaseHandler):
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return SwimmerArrives
# define actions for this room

class Next(Action):
    def __init__(self):
        Action.__init__(self, "Next")    # do basic initialization for every action
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'winningroom'
    
    def get_description(self):
        return "Next"
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"